package string;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String str = "123abc456def";
        String[] strs = str.split("[0-9]+");
        System.out.println(Arrays.toString(strs));//[ ,abc, def]

        str ="123.456.789.";
        strs=str.split("\\.");
        System.out.println(Arrays.toString(strs));//[123, 456, 789]

        str="abc=def==ghi===";
        strs=str.split("=");
        System.out.println(Arrays.toString(strs));//[abc, def, , ghi]
        System.out.println(strs.length);
    }
}
